package 集合.map集合;

public class HashMap01 {
    public static void main(String[] args) {
        //创建一个数组，数组的类型是Node01[]
        Node01[] table = new Node01[16];


        Node01 john = new Node01("john", null);
        //索引为2的位置添加链表
        table[2] = john;

        Node01 jack = new Node01("jack", null);
        john.next = jack;

        Node01 rose = new Node01("rose", null);
        jack.next = rose;
        System.out.println("table=" + table);
    }
}

class Node01{
    public Object item;//节点数据
    public Node01 next;//指向下一个节点
    public Node01 pre;//指向上一个节点

    public Node01(Object name, Node01 next) {
        this.item = name;
        this.next = next;
    }

    public String toString(){
        return "Node name= " + item + "\t Next=" + next;
    }
}
